// index.js
// 轮播
const imageCdn = 'https://tdesign.gtimg.com/mobile/demos';
const swiperList = [
  "/image/swiper1.png",
  "/image/swiper2.png",
  "/image/swiper3.png"
];

Page({
  data: {
    // 轮播
    current: 0,
    autoplay: false,
    duration: 500,
    interval: 5000,
    loop:true,
    swiperList,
    // 宫格
    img1: '/image/宫格1.png',
    img2: '/image/宫格2.png',
    img3: '/image/宫格3.png',
    img4:'/image/宫格4.png',
    // 产品列表推荐
    list:[
      {img:"/image/咖啡机.png",name:"咖啡机咖啡机1",text:"产品简介：产品简介简介产品简介简介简",sales:"销量 265",pirce:"￥200/月   押金：￥500",},
      {img:"/image/咖啡机.png",name:"咖啡机咖啡机1",text:"产品简介：产品简介简介产品简介简介简",sales:"销量 265",pirce:"￥200/月   押金：￥500",},
      {img:"/image/咖啡机.png",name:"咖啡机咖啡机1",text:"产品简介：产品简介简介产品简介简介简",sales:"销量 265",pirce:"￥200/月   押金：￥500",},
      {img:"/image/咖啡机.png",name:"咖啡机咖啡机1",text:"产品简介：产品简介简介产品简介简介简",sales:"销量 265",pirce:"￥200/月   押金：￥500",}
    ]
    },
    methods: {
      onTap(e) {
        const { index } = e.detail;
  
        console.log(index);
      },
      onChange(e) {
        const { current, source } = e.detail;
  
        console.log(current, source);
      },
      onImageLoad(e) {
        console.log(e.detail.index);
      },
    }
})
